<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns="http://www.w3.org/TR/xhtml1/strict">
	<xsl:output method="html" version="4.0"
		encoding="utf-8" indent="yes"/>
	<xsl:template match="/">
		<html>
			<head>
				<title>easyshopping - Userpage</title>
				<script type="text/javascript" src="js/jquery-1.3.2.min.js"><![CDATA[]]></script>
				<script type="text/javascript">
					$(function() {
						//hide/unhide section
						$("h3").click(function(){
							$(this).next().toggle();
						});
						//Move Product from one list to another
						$(".product").dblclick(function(){
							if($(this).parent().attr("id") == "productlist"){
								$("#shoppinglist").append($(this));
							}else{
								$("#productlist").append($(this));
							}
						});
						//insert products from template list
					});
				</script>
			</head>
			<body>
				<h1>easyshopping</h1>
				<h3>User</h3>
				<ul id="user">
					<xsl:for-each select="//user/*">
						<li><xsl:value-of select="text()" /></li>
					</xsl:for-each>
				</ul>
				<h3>Product list</h3>
				<ul id="productlist">
					<xsl:for-each select="//productlist/*">
						<li class="product"><xsl:value-of select="text()" /></li>
					</xsl:for-each>
				</ul>
				<h3>List templates</h3>
				<ul id="listtemplates">
					<xsl:for-each select="//listtemplates/*">
						<li><xsl:value-of select="text()" /></li>
					</xsl:for-each>
				</ul>
				<h3>Shoppinglist</h3>
				<ul id="shoppinglist">
					<xsl:for-each select="//shoppinglist/*">
						<li class="product"><xsl:value-of select="text()" /></li>
					</xsl:for-each>
				</ul>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>